package com.eckey.lab.entity;

/**
 * @Author: Marinc
 * @CreateTime: 2023-06-26  22:20
 * @Description: TODO
 * @Version: 1.0
 */
public class Constants {

    //es创建book index时mapping
    public static final String BOOK_STRING = "{\n" +
            "    \"mappings\": {\n" +
            "            \"properties\": {\n" +
            "                \"id\": {\n" +
            "                    \"type\": \"keyword\"\n" +
            "                },\n" +
            "                \"title\": {\n" +
            "                    \"type\": \"text\",\n" +
            "                    \"analyzer\": \"ik_max_word\"\n" +
            "                },\n" +
            "                \"category\": {\n" +
            "                    \"type\": \"keyword\"\n" +
            "                },\n" +
            "                \"brand\": {\n" +
            "                    \"type\": \"keyword\"\n" +
            "                },\n" +
            "                \"images\": {\n" +
            "                    \"type\": \"keyword\",\n" +
            "                    \"index\":  false\n" +
            "                },\n" +
            "                \"price\": {\n" +
            "                    \"type\": \"double\"\n" +
            "                }\n" +
            "            }\n" +
            "    }\n" +
            "}";

    //es创建hotel index时mapping
    public static final String HOTEL_STRING = "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"city\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"starName\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"id\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"img\": {\n" +
            "        \"type\": \"keyword\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"price\": {\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"deletePrice\": {\n" +
            "        \"type\": \"double\",\n" +
            "        \"index\": false\n" +
            "      },\n" +
            "      \"hotelName\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_max_word\"\n" +
            "      },\n" +
            "      \"address\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"location\": {\n" +
            "        \"type\": \"geo_point\"\n" +
            "      },\n" +
            "      \"num\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      },\n" +
            "      \"score\": {\n" +
            "        \"type\": \"double\"\n" +
            "      },\n" +
            "      \"adFlag\": {\n" +
            "        \"type\": \"boolean\"\n" +
            "      },\n" +
            "      \"suggestion\":{\n" +
            "        \"type\": \"completion\",\n" +
            "        \"analyzer\": \"completion_analyzer\"\n" +
            "      }\n" +
            "    }\n" +
            "  }";

    public static final String HOTEL_INDEX = "hotel";
}
